package site;

import biology.monster;
import tool.Tool;
import tool.replenishment;
import tool.weapon;

public class Site {
    private String name;

    private Site northExit;
    private Site southExit;
    private Site eastExit;
    private Site westExit;

    private monster monsterFirst;
    private monster monsterSecond;

    private weapon obtainWeapon;
    private replenishment obtainReplenishment;

    private  int judgeWhetherToWin;

    public Site() {
    }

    public Site(String name, int judgeWhetherToWin) {
        this.name = name;
        this.judgeWhetherToWin = judgeWhetherToWin;
    }

    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }

    public Site getNorthExit() {
        return northExit;
    }
    public void setNorthExit(Site northExit) {
        this.northExit = northExit;
    }

    public Site getSouthExit() {
        return southExit;
    }
    public void setSouthExit(Site southExit) {
        this.southExit = southExit;
    }

    public Site getEastExit() {
        return eastExit;
    }
    public void setEastExit(Site eastExit) {
        this.eastExit = eastExit;
    }

    public Site getWestExit() {
        return westExit;
    }
    public void setWestExit(Site westExit) {
        this.westExit = westExit;
    }

    public monster getMonsterFirst() {
        return monsterFirst;
    }
    public void setMonsterFirst(monster monsterFirst) {
        this.monsterFirst = monsterFirst;
    }

    public monster getMonsterSecond() {
        return monsterSecond;
    }
    public void setMonsterSecond(monster monsterSecond) {
        this.monsterSecond = monsterSecond;
    }

    public weapon getObtainWeapon() {
        return obtainWeapon;
    }
    public void setObtainWeapon(weapon obtainWeapon) {
        this.obtainWeapon = obtainWeapon;
    }

    public replenishment getObtainReplenishment() {
        return obtainReplenishment;
    }
    public void setObtainReplenishment(replenishment obtainReplenishment) {
        this.obtainReplenishment = obtainReplenishment;
    }

    public int getJudgeWhetherToWin() {
        return judgeWhetherToWin;
    }
    public void setJudgeWhetherToWin(int judgeWhetherToWin) {
        this.judgeWhetherToWin = judgeWhetherToWin;
    }

    public void setExits(Site north, Site east, Site south, Site west) {
        if(north != null)
            northExit = north;
        if(east != null)
            eastExit = east;
        if(south != null)
            southExit = south;
        if(west != null)
            westExit = west;
    }

    public void monsterArrive(monster monsterFirst, monster monsterSecond) {
        this.monsterFirst = monsterFirst;
        this.monsterSecond = monsterSecond;
    }

    public void setTool(weapon obtainWeapon, replenishment obtainReplenishment){
        this.obtainWeapon = obtainWeapon;
        this.obtainReplenishment = obtainReplenishment;
    }
}
